Add prop editors to testfontchooser{,dialog}
authorChristian Persch <chpe@gnome.org>
Mon, 5 Sep 2011 12:10:08 +0000 (14:10 +0200)
committerChristian Persch <chpe@gnome.org>
Tue, 13 Sep 2011 10:55:21 +0000 (12:55 +0200)
tests/Makefile.am
tests/testfontchooser.c
tests/testfontchooserdialog.c

index ac05e62e90da3ae11b677b9f2f5f12014e0329a4..8b8494dc56826baf82b40157f438eae772b69d28 100644 (file)
@@ -361,9 +361,11 @@ testfontselectiondialog_SOURCES = \
        testfontselectiondialog.c
 
 testfontchooser_SOURCES = \
+       prop-editor.c           \
        testfontchooser.c
 
 testfontchooserdialog_SOURCES = \
+       prop-editor.c           \
        testfontchooserdialog.c
 
 testgrid_SOURCES =     \
index 4c6f42c4a8f92ceac24be4b7adc528ead25454d4..4ff3668b427fe9b790ed86586f421b0d694651e6 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <gtk/gtk.h>
+#include "prop-editor.h"
 
 static void
 notify_font_name_cb (GObject *fontchooser, GParamSpec *pspec, gpointer data)
@@ -61,6 +62,8 @@ main (int argc, char *argv[])
   gtk_font_chooser_set_preview_text (GTK_FONT_CHOOSER (fontchooser), "[user@host ~]$ &>>");
   gtk_font_chooser_set_show_preview_entry (GTK_FONT_CHOOSER (fontchooser), FALSE);
 
+  create_prop_editor (G_OBJECT (fontchooser), GTK_TYPE_FONT_CHOOSER);
+
   gtk_main ();
 
   return 0;
index 23be106124f1d6172335441abcea84b039aa6a09..bc7665252283990639b5ed9027587c49a0ad4e24 100644 (file)
  */
 
 #include <gtk/gtk.h>
+#include "prop-editor.h"
 
 int
 main (int argc, char *argv[])
 {
   GtkWidget *window;
+  GtkWidget *font_button;
 
   gtk_init (&argc, &argv);
 
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_add (GTK_CONTAINER (window), gtk_font_button_new ());
+  font_button = gtk_font_button_new ();
+  gtk_container_add (GTK_CONTAINER (window), font_button);
   gtk_widget_show_all (window);
 
+  g_signal_connect (window, "delete-event",
+                    G_CALLBACK (gtk_main_quit), NULL);
+
+  create_prop_editor (G_OBJECT (font_button), 0);
+
   gtk_main ();
 
   return 0;